package com.atlin.project.bizmq.bi;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @author atlin
 * @description
 * @createDate 2024/11/17 17:13
 */
@Component
public class BiMessageProducer {
    @Resource
    private RabbitTemplate rabbitTemplate;

    /**
     * 发送消息
     *
     * @param message 内容消息
     */
    public void sendMessage(String message) {
        rabbitTemplate.convertAndSend(BiMqConstants.BI_EXCHANGE_NAME, BiMqConstants.BI_ROUTING_KEY, message);
    }


}
